import request from "@/utils/request";

export function listDictData(data) {
    return request({
        url: '/system/dict_data/list',
        method: 'get',
        params: data
    })
}

export function addDictData(data) {
    return request({
        url: '/system/dict_data/insert',
        method: 'post',
        data: data
    })
}

export function deleteDictData(dictDataId) {
    return request({
        url: '/system/dict_data/delete/' + dictDataId,
        method: 'delete'
    })
}

export function getDictData(dictDataId) {
    return request({
        url: '/system/dict_data/' + dictDataId,
        method: 'get'
    })
}

export function updateDictData(data) {
    return request({
        url: '/system/dict_data/update',
        method: 'put',
        data: data
    })
}

export function getDictByType(dictType){
    return request({
        url: '/system/dict_data/type/' + dictType,
        method: 'get'
    })
}
